package org.gordonframework.site.factories {
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.media.Sound;
	import flash.system.ApplicationDomain;	

	/**
	 * @author sampet
	 */
	public class GLibrary {

		public static function createBitmap(linkage:String):Bitmap {
			return new Bitmap( createBitmapData( linkage ) );
		}

		public static function createBitmapData(linkage:String):BitmapData {
			return new (ApplicationDomain.currentDomain.getDefinition( linkage ))( 0, 0 ) as BitmapData;
		}

		public static function createMovieClip(linkage:String):MovieClip {
			return new (ApplicationDomain.currentDomain.getDefinition( linkage ))( ) as MovieClip;
		}

		public static function createSound(linkage:String):Sound {
			return new (ApplicationDomain.currentDomain.getDefinition( linkage ))( ) as Sound;
		}

		public static function createSprite(linkage:String):Sprite {
			return new (ApplicationDomain.currentDomain.getDefinition( linkage ))( ) as Sprite;
		}
	}
}
